|
|
|
CAUTION
|
|
|
|
|
You cannot use a separator bar in the top level of the menu (the menu bar); separator bars must be part of a submenu. If you attempt to use a separator in the menu bar, Visual Basic informs you of the error as you try to save the menu. |
|
|
|
|
|
|
|
|
|
|
After creating your menu, you will probably find that you need to make some changes to the menu's structure. This task also is easily accomplished with the Menu Editor. Table 6.1 lists some common editing needs and how they are accomplished. |
|
|
|
|
| Table 6.1 Modifying Your Menu | | Editing Function | How to Do It | | Move an item | Select the item, and then click one of the Move arrows to move the item up or down in the list. The indentation level of the menu does not change as you move the item. | | Add an item to the middle of the list | Select the item that should appear below the new item in the middle of the list and then click the Insert button. A blank item appears; you can then enter the Caption and Name properties for the item. The new item is indented at the same level as the item below it. | | Remove an item | Select the item, and then click the Delete button. The item is immediately deleted, without any confirmation. (There is no Undo feature available in the Menu Editor; whatever you delete is gone. However, if you wrote any program code for the menu control, that code is still present in the Code window.) |
|
|
|
|
|
|
Now you can use these menu modification techniques to regroup the items and to insert the separator bars mentioned in the preceding section. To do so, follow these steps: |
|
|
|
|
|
|
|
|
1. While Form1 is selected, open the Menu Editor. |
|
|
|
|
|
|
|
|
2. Click the Print menu item once to select it. |
|
|
|
|
|
|
|
|
3. Click the downward-facing arrow twice to move the item just above the Send To menu item. (If you need to move an item up, click the upward-facing arrow.) |
|
|
|
|
|
|
|
|
4. With the Print menu item still selected, click the Insert button to create a blank menu item above the Print item. |
|
|
|
|
|
|
|
|
5. Click in the Caption field, and type a single hyphen (-). |
|
|
|
|
|
|
|
|
6. Tab to the Name field and type mnuHyphen1. |
|
|
|
|
|